export let Vue;

export const install = (_Vue) => {
  Vue = _Vue;
  // console.log("插件安装");
  Vue.mixin({
    beforeCreate() { // beforeCreate 渲染默认就是先父后子
      // 将 $store 属性都共享给每个组件
      if (this.$options && this.$options.store) {
        this.$store = this.$options.store;
      } else {
        this.$store = this.$parent && this.$parent.$store;
      }
    }
  });
}